
from clickFuUtils import cfAction

class osmMap(cfAction):
    def __init__(self,iface):
        cfAction.__init__(self,self.name(),iface)
        return None

    def name(self):
        return "View OSM map"
    def desc(self):
        return "Goto Location on OpenStreetMap"

    def createURL(self,lat,long):
        url = "http://www.openstreetmap.org/?lat=%s&lon=%s&zoom=12" % (lat,long)
        return url


class osmeditMap(cfAction):
    def __init__(self,iface):
        cfAction.__init__(self,self.name(),iface)
        return None

    def name(self):
        return "Edit OSM map"
    def desc(self):
        return "Goto Location on OpenStreetMap and start editing"

    def createURL(self,lat,long):
        url = "http://www.openstreetmap.org/edit?lat=%s&lon=%s&zoom=12" % (lat,long)
        return url
